﻿using Xejen.Communication.Endpoints;
using System.Threading.Tasks;

namespace Xejen.Communication.Logger
{
    /// <summary>
    /// 表示可记录到数据库中的数据信息
    /// </summary>
    /// <creator>marc</creator>
    public interface ILogData<TCommunicationAddress, TResponse>
        where TResponse : IResult
    {
        /// <summary>
        /// 线程Id，如果为空，表示同步请求，此情况下没有线程Id
        /// </summary>
        Task Task { get; }

        /// <summary>
        /// 请求地址
        /// </summary>
        TCommunicationAddress Address { get; }

        /// <summary>
        /// 发送的数据
        /// </summary>
        object Input { get; }

        /// <summary>
        /// 请求结果
        /// </summary>
        TResponse Response { get; }

        /// <inheritdoc cref="Xejen.Communication.Logger.ExecutionInfo"/>
        ExecutionInfo ExecutionInfo { get; }
    }
}